package network

import okhttp3.Interceptor
import okhttp3.Response

class AuthInterceptor(private val token: String): Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val req = chain.request().newBuilder()
            .url("${chain.request().url()}&units=metric&lang=ru&appid=$token")
            .build()

        return chain.proceed(req)
    }
}